<?php
define( 'YZ_TIME', microtime(true) );

function debug( $msg )
{
    print $msg . "\n";
}

require_once( './lib/Yz/Autoloader.php' );
Yz_Autoloader::init('./lib');

class X extends Yz_Application_Console
{
    protected function __invoke()
    {
        Yz_Log_Log::log( "Here" );


#        $cfg = Yz::getConfig()->fetchSection("I18N");
#        var_dump( $cfg );
#        return 0;

        $cfgloader = Yz_Config_Loader::getInstance();
        $str = <<<str
{ test: ok, rest: too, fest: ябывсемпочайнойложке
mfc: "what the", shit: { 'yes': no, "true": true, "null": null, realShot: {a:b}, fuck: off } }
str;
        try {
            $value = $cfgloader->load( $str, 'test', new Yz_Config );
        } catch ( Yz_Config_Exception $ex ) {
            print "Exception: $ex\n";
        }
        var_dump( $value );
        print "And now the real %hash->shit->yes: {$value->shit->yes}, yeah?\n";
        print "shit.true=" . $value->fetchString( "shit.realshot.a" );
        print "\n";
        return 0;
    }
}

return X::main();

